package co.yixiang.modules.shop.repository;

import co.yixiang.modules.shop.domain.YxSystemConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
* @author hupeng
* @date 2019-10-10
*/
public interface YxSystemConfigRepository extends JpaRepository<YxSystemConfig, Integer>, JpaSpecificationExecutor {
    YxSystemConfig findByMenuName(String str);
    @Modifying
    @Query(value = "update yx_system_config set value=?2 where menu_name=?1",nativeQuery = true)
    void updateValue(String menuName, String value);
}